package com.littlebee.storychild.common.utils;

import android.os.Environment;

import com.littlebee.storychild.common.BuildConfig;

/**
 * 作者：liaoyong on 2016/7/13 08:14
 * 邮箱：liaoyong@tuliu.com
 * 描述：app配置类，提供所有host等的配置。
 */
public class Constant {
    public static final String FIRST_REC_PATH="http://47.92.37.125:9090/piecefile/HB60000000-20170912082924.mp3";
    public static final String FIRST_ENG_PATH="http://47.92.37.125:9090/piecefile/HB60000000-20170918115939.mp3";
    public static final String FIRST_STORY_PATH="http://47.92.37.125:9090/piecefile/HB60000000-20170918115813.mp3";

    public static final  String appName="childapp";

    public static final int kTestType = 1; //为测试环境
    public static final int kReleaseType = 4; //为发布环境
    public static final int kEnvironmentType = BuildConfig.kEnvironmentType;

    /** 不同环境路径：开发Dev(RAP)、TEST、预生产STAGE、生产PROD */
    private final static String ENVIRONMENT;//定义域名，比如：11.11.11.11：8888
    public final static String HOST;//ENVIRONMENT + server
    public static boolean JPUSH_ENABLE = false;//极光推送是否启用（false不启用 true启用  只能控制别名，不能控制全局通知 ）
    static {
        if (kEnvironmentType == kReleaseType) {
            ENVIRONMENT = "http://xiaoyuandailu.com:9090";
            HOST = ENVIRONMENT + "/butel/cloudrecord";
            JPUSH_ENABLE = false;
        } else if (kEnvironmentType == kTestType) {
            ENVIRONMENT = "http://192.168.1.106:8080";
            HOST = ENVIRONMENT + "/soundcloud_web";
            JPUSH_ENABLE = false;
        } else {
            ENVIRONMENT = "http://svr.tuliu.com";
            HOST = ENVIRONMENT + "/center";
            JPUSH_ENABLE = false;
        }
    }
    public static String UPLOAD_PATH="http://47.92.37.125:9090/butel/HTTP";
    public static String UPLOAD_File_PATH="http://47.92.37.125:9090/piecefile/";

    public static final int pageSize = 10;
    public static final String[] rateLevel = {"失望", "不满", "一般", "满意", "惊喜"};

    public static final String SHARE_USER_NAME = "USER";
    public static final int IS_TRADE_PASSWORD_SET = 1;


    /**极光IMkey*/
    public static final String JPUSH_KEY="f71de34f495d9c3b4a7b4365";

    /**妈妈端的IM Key*/
    public final static String MONTHER_IM_KEY="c104cf53f79d6cd8dbd68b5b";

    /**
     * 拍照
     */
    public static final int PHOTO_REQUEST_TAKEPHOTO = 2;

    /**
     * 临时图片地址
     */
    public static final String srcPath = Environment.getExternalStorageDirectory()
            .getAbsolutePath()
            + "/cacheImage.jpg";


    /**
     * 从相册中选择
     */
    public static final int PHOTO_REQUEST_GALLERY = 3;

    public static String Login = HOST + "/login";

    public static String SERVICE_DETAIL = HOST + "/getsendtobaby";

    public static String VerionUrl = HOST + "/getbabyversioninfo";





    //*/

    /**
     * SharedPreferences Name
     */
    public static final String shareName = "USER";

    public final static String kRootPath = "/";
    public final static String kParentDirName = "storychild";
    /*
     * http config
     *  */
    //http de code
    public final static int kSUCCESS = 200;
    public final static int kTokenError = 999;
    public final static int kTokenError2 = 998;
    //
}
